<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/include/taglib.jsp"%>
<form id="pagerForm" method="post" action="${ctx}/management/user">
	<input type="hidden" name="username" value="${user.username}">
	<input type="hidden" name="phone" value="${user.phone}" />
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${datas.pageSize}" />
	<input type="hidden" name="orderField" value="${datas.orderBy}" />
	<input type="hidden" name="orderDirection" value="${datas.orderDirection}" />
</form>


<div class="pageHeader">
	 <form   onsubmit="return navTabSearch(this);" action="${ctx}/management/user" method="post" >
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					用户名：<input type="text" name="username" value="${user.username }" /> 
				</td>
				<td>
					手机号：<input type="text" name="phone" value="${user.phone }" /> 
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
			</ul>
		</div>
	</div>
	</form> 
	
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="useradd.html" height="300" width="800" target="dialog" rel="addUser"><span>添加</span></a></li>
			<li><a class="delete" href="${ctx}/management/user/delete?id={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="${ctx}/management/user/edit?id={sid_user}" target="navTab"><span>修改</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="80">序号</th>
				<th width="100" orderField="username" <c:if test='${datas.orderBy eq "username" }'> class="${datas.orderDirection }"</c:if> >用户名</th>
				<th width="120" orderField="email" <c:if test='${datas.orderBy eq "email" }'> class="${datas.orderDirection }"</c:if>>Email</th>
				<th width="120" orderField="phone" <c:if test='${datas.orderBy eq "phone" }'> class="${datas.orderDirection }"</c:if>>手机号</th>
				<th width="120" orderField="createDate" <c:if test='${datas.orderBy eq "createDate" }'> class="${datas.orderDirection }"</c:if>>注册时间</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${datas.list }" var="user" varStatus="index">
				<tr target="sid_user" rel="${user.id }">
				<td>${(datas.pageNo-1)*datas.pageSize+1 + index.index}</td>
				<td>${user.username }</td>
				<td>${user.email }</td>
				<td>${user.phone }</td>
				<td><fmt:formatDate value="${user.createDate }" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${datas.count }条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${datas.count }" numPerPage="${datas.pageSize }" pageNumShown="8" currentPage="${datas.pageNo}"></div>
	
</div>
